package net.xumf.support.model.vo;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import net.xumf.support.enums.QuartzTriggerState;
import net.xumf.support.enums.codec.QuartzTriggerStateCodec;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CronTriggerVO {

    // 定时器名称
    private String jobName;
    // cron表达式
    private String cronExpression;
    // 备注
    private String description;
    // 执行job类名
    private String jobClassName;
    // 定时器的运行状态
    @JSONField(serializeUsing = QuartzTriggerStateCodec.class, deserializeUsing = QuartzTriggerStateCodec.class)
    private QuartzTriggerState status;
    // 状态名
    private String statusName;
    public String getStatusName() {
        return status.getMsg();
    }
}
